//
//  JsExpressionChooseView.m
//  DuTe
//
//  Created by Gikki Ares on 2020/12/23.
//  Copyright © 2020 vgemv. All rights reserved.
//

#import "JsExpressionChooseView.h"


@interface JsExpressionChooseView()<
UICollectionViewDelegate,
UICollectionViewDataSource
>

{
	UICollectionView * mcv;
	UIPageControl * mpc;
}


@end

@implementation JsExpressionChooseView

- (instancetype)initWithFrame:(CGRect)frame {
	if(self = [super initWithFrame:frame]) {
		[self commonInit];
	}
	return self;
}

- (void)commonInit {
	mcv = [[UICollectionView alloc]initWithFrame:self.bounds];
	mcv.delegate = self;
	mcv.dataSource = self;
	UICollectionViewFlowLayout * layout =  (UICollectionViewFlowLayout *)mcv.collectionViewLayout;
	layout.scrollDirection = UICollectionViewScrollDirectionVertical;
//	[mcv registerClass:[GaoCvcIl class] forCellWithReuseIdentifier:@"cell"];
}

/**
 布局子类的位置.
 */
- (void)layoutSubviews {
	[super layoutSubviews];
	
}
 


#pragma mark 4 Delegate
#pragma mark 4.2 UICollectionView
#pragma mark 4.2.1 UICollectionViewDatasource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
//	return self->marr.count;
	return 0;
}
//
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
//	GaoCvcIl * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
//	GaoCvcIlModel * model = self->marr[indexPath.item];
//	[cell displayModel:model];
//	return cell;
	return nil;
}
//
//- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
//		//点击相同的-return;
//	if(mnsIndexPath_selected && indexPath.row == mnsIndexPath_selected.row && indexPath.item == mnsIndexPath_selected.item) {
//		return;
//	}
//
//		//更新UI
//		//更新选中和未选中的样式
//	NSMutableArray * marr_reload = [NSMutableArray array];
//	if(mnsIndexPath_selected) {
//		GaoCvcIlModel * gaoCvcIlModel_old = marr[mnsIndexPath_selected.item];
//		gaoCvcIlModel_old->mb_isSelected = false;
//		[marr_reload addObject:mnsIndexPath_selected];
//		[marr_reload addObject:indexPath];
//	}
//	else {
//		[marr_reload addObject:indexPath];
//	}
//	mnsIndexPath_selected = indexPath;
//	GaoCvcIlModel * gaoCvcIlModel_new = marr[mnsIndexPath_selected.item];
//	gaoCvcIlModel_new->mb_isSelected = true;
//	[UIView performWithoutAnimation:^{
//		[collectionView reloadItemsAtIndexPaths:marr_reload];
//	}];
//
//		//移动浮标
//	GaoCvcIl * cell = (GaoCvcIl *)[collectionView cellForItemAtIndexPath:indexPath];
//	if(self->mv_mask.hidden) {
//		self->mv_mask.hidden = NO;
//		self->mv_mask.frame = cell.frame;
//	}
//	else {
//		[UIView animateWithDuration:0.1 delay:0.1 options:UIViewAnimationOptionCurveEaseInOut animations:^{
//			self->mv_mask.frame = cell.frame;
//			self->mv_mask.hidden = NO;
//		} completion:^(BOOL finished) {
//		}];
//	}
//	if(mv_indicator) {
//		if(mv_indicator.hidden) {
//			[self moveIndicatorForCell:cell animated:NO];
//		}
//		else {
//				//移动Indicator
//			[self moveIndicatorForCell:cell animated:YES];
//		}
//	}
//	int i_index_selected = (int)indexPath.row;
//	mn_index_selected = @(i_index_selected);
//
//
//		//事件代理
//	if(self.delegate && [self.delegate respondsToSelector:@selector(gaoMenuView:chooseMenuAtIndex:)]) {
//		[self.delegate gaoMenuView:self chooseMenuAtIndex:(int)indexPath.item];
//	}
//}
//
//
//#pragma mark 4.2.3 UICollectionViewDelegateFlowLayout
//	//返回section和CollectionView容器的边距,top,left,bottom,right;
//- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
//	return mgaoMenuViewStyle.edgeInset;
//}
//
//- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
//	GaoCvcIlModel * model = marr[indexPath.row];
//	GaoCvcIlStyle * style = model->mstyle;
//	return style->mf_cellSize;
//}
//
//	//流动方向上cell之间的间距
//- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
//	return mgaoMenuViewStyle.minimumLineSpacing;
//}
//
//	//cell之间垂直流动方向上的间距
//- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
//	CGFloat minimumInteritemSpacing = mgaoMenuViewStyle.minimumInteritemSpacing;
//	return minimumInteritemSpacing;
//}



@end
